﻿{include file='pub/header'/}
</head>
<body class="pos-r">
<div>
    <div class="page-container">
        <div class="mt-20">
            <table class="table table-border table-bordered table-bg table-hover table-sort">
                <thead>
                <tr class="text-c">
                    <th width="40">规格名称</th>
                    <th width="40">线上价格</th>
                    <th width="40">线下价格</th>
                    <th width="40">数量</th>
                    <th width="40">条码</th>
                    <th width="100">操作</th>
                </tr>
                </thead>
                <tbody>
                {foreach $list as $item}
                <tr class="text-c va-m">
                    <td>{$item.prop_name}</td>
                    <td>{$item.prop_active_price}</td>
                    <td>{$item.prop_price}</td>
                    <td>{$item.num}</td>
                    <td>{$item.prop_no}</td>
                    <td class="td-manage">
                        <a style="text-decoration:none" class="ml-5" onClick="delProp(this,'{$item.id}')"
                           href="javascript:;" title="删除">
                            <i class="Hui-iconfont">&#xe6e2;</i>删除
                        </a>
                    </td>
                </tr>
                {/foreach}
                </tbody>
            </table>
        </div>
    </div>
</div>

{include file='pub/footer'/}
<script type="text/javascript">
    function delProp(o, id) {
        layer.confirm('确定删除？', function () {
            $.post("{:url('Products/delProp')}", {id:id}, function (res) {
                if(res.code == 1){
                    layer.msg('删除成功');
                    $(o).parent().parent().remove();
                }else{
                    layer.msg(res.msg);
                }
            });
        })
    }


</script>
</body>
</html>